package com.iflytek.esb.exceptions;

public class RetryableException extends RuntimeException {

	private static final long serialVersionUID = 326762837171937505L;
	private int intervalInSeconds;
	private int maxTry;
	
	public int getIntervalInSeconds() {
		return intervalInSeconds;
	}

	public int getMaxTry() {
		return maxTry;
	}

	public RetryableException(int intervalInSeconds, int maxTry) {
		super();
		this.intervalInSeconds = intervalInSeconds;
		this.maxTry = maxTry;
	}
	
	public RetryableException(int intervalInSeconds, int maxTry, String message) {
		super(message);
		this.intervalInSeconds = intervalInSeconds;
		this.maxTry = maxTry;
	}
	
	public RetryableException(int intervalInSeconds, int maxTry, String message, Throwable t) {
		super(message, t);
		this.intervalInSeconds = intervalInSeconds;
		this.maxTry = maxTry;
	}

	public RetryableException(int intervalInSeconds, int maxTry, Throwable t) {
		super(t);
		this.intervalInSeconds = intervalInSeconds;
		this.maxTry = maxTry;
	}
}
